﻿using Orchard.ContentManagement;
using Orchard.Core.Routable.Models;

namespace Contrib.Chapters.Models {
    public class BookPart : ContentPart<BookPartRecord> {
        public string Name {
            get { return this.As<RoutePart>().Title; }
            set { this.As<RoutePart>().Title = value; }
        }

        public string Slug {
            get { return this.As<RoutePart>().Slug; }
            set { this.As<RoutePart>().Slug = value; }
        }

        public string Path {
            get { return this.As<RoutePart>().Path; }
            set { this.As<RoutePart>().Path = value; }
        }

        public string ChapterTypeName
        {
            get { return Record.ChapterTypeName; }
            set { Record.ChapterTypeName = value; }
        }
    }
}
